<template>
  <view style="padding: 40rpx;">
    <!--中药材详情信息-->
    <view class="box">
      <image :src="medicine.icon" style="width: 100%;height: 500rpx;"></image>
      <view style="padding: 10rpx;font-size: 40rpx; color: black;">
        <text style="color: #008000; font-size: 60rpx;">{{medicine.mname}}</text><br>
        <text>类别：{{medicine.mclass}}</text><br>
        <text>味：{{medicine.mflavor}}</text><br>
        <text>功效：{{medicine.mfunction}}</text><br>
        <text>药性：{{medicine.mproperty}}</text><br>
        <text>归经：{{medicine.mjing}}</text><br>
        <text>趋向性：{{medicine.mtendency}}</text><br>
        <text>产地：{{medicine.mplace}}</text><br>
        <text>价格：{{medicine.mprice}}</text><br>
        <text>毒性：{{medicine.mtoxicity}}</text><br>
      </view>
    </view>
    
  </view>
</template>

<script>
  export default {
    data() {
      return {
        id:0,
        medicine:{}
      }
    },
    onLoad(option) {
      this.id = option.id
      this.load()
    },
    methods: {
      load(){
        this.$request.get('/medicines/selectById/' + this.id).then(res => {
          this.medicine = res.data || {}
          console.log(this.medicine)
        })
      }
      
    }
  }
</script>

<style>
  .box{
  background-color: #fff; 
  border-radius: 10rpx; 
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, .2);
  height: 1300rpx; 
  }

</style>
